package com.superjson.showpro.entity;

import com.beantools.annotation.NotNull;
import com.superjson.showpro.base.BaseObj;
import com.superjson.showpro.shared.enums.EvaluateResultEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created By zby on 20:51 2019/5/28
 * 评价这篇文章如何
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@Entity
@Table(name = "sp_evaluate")
public class Evaluate extends BaseObj implements Serializable{

    private static final long serialVersionUID = 354616222767148643L;
    /**
     * 文章目录
     */
    @ManyToOne
    @JoinColumn(name = "article_catalog_id")
    private ArticleCatalog articleCatalog;

    /**
     * 文章好坏，枚举
     */
    @Enumerated(EnumType.STRING)
    @Column(name = "evaluate_result")
    @NotNull
    private EvaluateResultEnum evaluateResult;

    /**
     * ip地址
     */
    @Column(name = "ip")
    private String ip;

    /**
     * session会话
     */
    @Column(name = "token")
    private String token;

}